//
//  NCChatInputView.h
//  AFNetworking
//
//  Created by LINAICAI on 2018/4/8.
//

#import <UIKit/UIKit.h>

@protocol NCChatInputViewDataSource<NSObject>
- (NSArray<NSString *> *)chatInputViewMoreActionTitles;
- (NSArray<UIImage *> *)chatInputViewMoreActionImages;
@end
@protocol NCChatInputViewDelegate<NSObject>
///功能按钮点击
- (void)chatInputViewMoreActionWithIndexPath:(NSIndexPath *)indexPath;
///文本发送
- (void)chatInputViewSendText:(NSString *)text;
@end

typedef NS_OPTIONS(NSUInteger, NCChatInputStatus) {
    ///正常状态,键盘收起的
    NCChatInputStatusNomal = 1 << 0,
    ///文本输入状态
    NCChatInputStatusText = 1 << 1,
    ///表情输入状态
    NCChatInputStatusEmoticon = 1 << 2,
    ///语音输入状态
    NCChatInputStatusAudio = 1 << 3,
    ///更多菜单按钮打开的状态
    NCChatInputStatusMore = 1 << 4
};

@interface NCChatInputView : UIView
///文本输入控件
@property (nonatomic , strong)UITextView *inputView;
///底部键盘控件
@property (nonatomic , strong)UIView *bottomView;
///中间主要的视图控件
@property (nonatomic , strong)UIView *middleView;
///顶部辅助视图控件
@property (nonatomic , strong)UIView *topView;
///键盘状态
@property(nonatomic , assign)NCChatInputStatus status;
@property (nonatomic , weak)id<NCChatInputViewDataSource> dataSource;
@property (nonatomic , weak)id<NCChatInputViewDelegate> delegate;


- (instancetype)initWithStatus:(NCChatInputStatus)status NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
- (instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;

- (void)resetHeightWithBottom:(UIView *)bottom;
- (void)resetHeightWithTop:(UIView *)top;
- (void)prepareDisplay;
- (void)setupUI;
@end


